package com.adtec.base.cloud.baseservice.rbac.system.service;

import com.adtec.base.cloud.persistence.system.mapper.GlobalLogMapper;
import com.adtec.base.cloud.persistence.system.mapper.MySystemMapper;
import com.adtec.base.cloud.persistence.system.model.GlobalLog;
import com.adtec.base.cloud.persistence.system.model.SysUserOrg;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Date;

@Service
public class GlobalLogService {
    @Resource
    private GlobalLogMapper globalLogMapper;
    @Resource
    private MySystemMapper mySystemMapper;

    public IPage<GlobalLog> queryLog(String url,
                                     String username,
                                     String address,
                                     Date createStartTime,
                                     Date createEndTime,
                                     Integer pageNum,
                                     Integer pageSize) {
        Page<GlobalLog> page = new Page<>(pageNum, pageSize);
        return mySystemMapper.selectLog(page,url,username,address,createStartTime,createEndTime);
    }
}
